package com.example.tdemo.tvo;

/**
 * 静态代码块，代码块，构造方法 执行顺序
 */
public class StaticRunTime extends StaticRunTimeFather{
    {
        System.out.println("1 代码块 运行");
    }

    static{
        System.out.println("1 静态代码块 运行");
    }

    public StaticRunTime(){
        System.out.println("StaticRunTime 运行");
    }

    private StaticRunTime(String name){

    }

    static{
        System.out.println("2 静态代码块 运行");
    }

    {
        System.out.println("2 代码块 运行");
    }

    public static void main(String[] args) {
        new StaticRunTime();
        new StaticRunTime();
    }
}
